package com.joint.core.service;

import com.joint.base.service.BaseEntityService;
import com.joint.core.bean.PublicEnum;
import com.joint.core.entity.Dictionary;
import java.util.List;

/**
 * Created by dqf on 2015/8/20.
 */
public interface DictionaryService extends BaseEntityService<Dictionary, String> {
    /**
     * 查询指定类别下的所有字典
     * @param type
     * @return
     */
    public List<Dictionary> findByTypeAll(PublicEnum.DictionaryEnm type);

    /**
     * 查询指定类别下指定状态的字典
     * @param type
     * @param isClosed
     * @return
     */
    public List<Dictionary> findByType(PublicEnum.DictionaryEnm type, boolean isClosed);

    /**
     * 查询子节点
     * @param dict
     * @return
     */
    public List<Dictionary> findChildAll(Dictionary dict);

    public List<Dictionary> findChildByState(Dictionary dict, boolean isClosed);

}
